wget http://mirrors.ustc.edu.cn/archlinux/images/latest/Arch-Linux-x86_64-basic.qcow2

# user arch passwd arch
# scp openEuler-24.09-x86_64.qcow2 root@10.11.24.7:/vms/FC03
# web上传

ip addr add 10.11.27.60/24 dev ens7
ip route add default via 10.11.27.254
echo "nameserver 180.184.1.1" >/etc/resolv.conf

echo "Server = https://mirrors.pku.edu.cn/archlinux/$repo/os/$arch" >/etc/pacman.d/mirrorlist

pacman -Syy vim

echo "PermitRootLogin yes" >>/etc/ssh/sshd_config
# echo "StrictModes yes" >>/etc/ssh/sshd_config
# echo "PasswordAuthentication yes" >>/etc/ssh/sshd_config
systemctl restart sshd

pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

# 显卡驱动（CUDA驱动）：向下兼容的，可以一直保持最新。
# wget wget https://developer.download.nvidia.com/compute/cuda/12.6.1/local_installers/cuda_12.6.1_560.35.03_linux.run

# /etc/profile文件
# echo export PATH=${PATH}:/usr/local/cuda-12.3/bin >> /etc/profile
# echo export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/cuda-12.3/lib64 >> /etc/profile
# source /etc/profile
# nvcc -V

# wasmedge nn
curl -sSf https://gitea.lntu.edu.cn/youling/wasmedge/raw/branch/main/install_wasmedge.sh | bash -s -- --plugin wasi_nn-ggml
source $HOME/.wasmedge/env

# 配置docker加速
touch /etc/docker/daemon.json
echo '{
    "registry-mirrors": [
        "https://docker.linkos.org",
        "https://docker.linkos.org",
        "https://dockerproxy.com",
        "https://mirror.baidubce.com",
        "https://docker.nju.edu.cn",
        "https://docker.mirrors.sjtug.sjtu.edu.cn/",
        "https://docker.mirrors.ustc.edu.cn",
        "https://docker.m.daocloud.io",
        "https://reg-mirror.qiniu.com"
    ],
    "data-root": "/data/docker"
}' | sudo tee -a /etc/docker/daemon.json


# 配置运行时
nvidia-ctk runtime configure --runtime=docker

## docker image 更改地址
# /etc/docker/daemon.json
# "data-root": "/data/dockercache"

systemctl enable docker
systemctl restart docker